<template>
  <div class="main">
    <div class="center">
      <div class="navbar">
        <Header></Header>
        <div class="heihao-box" v-loading="loading" element-loading-text="查询中..."
          element-loading-spinner="el-icon-loading"
          element-loading-background="rgba(0, 0,0, 0.8)">
          <h1 >黑名单查询</h1>
          <label for="">
            <el-input
            size="big"
              v-model="account"
              placeholder="请输入要查询的账号"
              clearable
            />
            <el-button type="primary" size="big" @click="handleQuery" >查询</el-button>
          </label>

          <div class="result">
            <span style="color:#FF4141" v-if="resultData&&resultData.length">该账号在黑名单中!</span>
            <span style="color:#00b700" v-if="resultData&&resultData.length==0">该账号不在黑名单中</span>
          </div>

          <div class="btns">
            <el-button type="primary" size="big" @click="lianxiwomenfn" >我要入驻</el-button>
          </div>
        </div>
      </div>
    </div>
  
    <!-- 底部 -->
    <Footer></Footer>
    <Lianxiwomen ref="Lianxiwomen"></Lianxiwomen>

  </div>
</template>
  
  <script>
import Header from '../../../components/ConsignmentFourzero/header.vue'
import Footer from '../../../components/ConsignmentFourzero/footer.vue'
import { listBlack } from "@/api/black/black";
import Lianxiwomen from "@/components/ConsignmentFourzero/lianxiwomen.vue"
export default {
  components: {
    Header,
    Footer,
    Lianxiwomen
  },
  data() {
    return {
      account:'',
      loading:false,
      showResult:false,
      resultData:''
    }
  },
  created() {
    
  },
  methods: {
    handleQuery(){
      if ('' == this.account || null == this.account){
        this.$message.error('请输入账号!');
        return true;
      }
      this.loading = true
      listBlack({content:this.account}).then(res => {
        this.loading = false
        // this.showResult = true
        this.resultData = res.rows
      });
    },
    // 联系我们
    lianxiwomenfn(){
      this.$refs.Lianxiwomen.open()
    },
  }
}
  </script>
  
  <style lang="scss" scoped>
.main {
  width: 100%;
  background-color: #000;

}
.center {
  .navbar {
    width: 1200px;
    margin: 0 auto;
  }

}
.heihao-box{
  background-image: url('../../../assets/img/heihaobg.png');
  background-size: 100% 100%;
  height: calc(100vh - 400px);
  padding: 60px;
  position: relative;
  h1{
    color: #fff;
    font-size: 32px;
    margin-top: 50px;
    margin-bottom: 50px;
  }
  ::v-deep .el-input,::v-deep .el-input__inner{
    background-color: #fff;
    width: 438px;
    height: 48px;
  }
  ::v-deep .el-button{
    height: 48px;
    background: #5D87FF;
    border-radius: 4px;
    border: none;
    margin-left: 15px;
  }
  .result{
    margin-top: 30px;
    
    font-weight: 800;
    font-size: 18px;
  }
  .btns{
    position: absolute;
    bottom: 70px;
    left: 0;
    right: 0;
  }
}
</style>